package com.guo.fristspringboot.dao.impl;

import com.guo.fristspringboot.dao.BookDao;
import com.guo.fristspringboot.entity.Book;
import com.guo.fristspringboot.service.BookService;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class BookDaoImpl implements BookDao {

//    @Autowired
    private BookService bookService;

    /*@Override
    public void save(Book book) {

    }

    @Override
    public void update(Book book) {

    }

    @Override
    public void delete(Integer id) {

    }*/


    public Book getById(Integer id) {
        return bookService.getById(id);
    }


    public List<Book> getAll() {
        return bookService.getAll();
    }
}
